from scrapy import cmdline

# cmd = 'scrapy crawl fk'
# #scrapy crawl pythonPosition
# cmdline.execute(cmd.split())
import time
import datetime
import os
# num=1
#
# while True:
#   num+=1
#   newtime1=time.time()
#   print(newtime1)
#   os.system("scrapy crawl fk")
#   newtime2 = time.time()
#   print(newtime2)
#   new=int(newtime2-newtime1)
#   print(new)
#   if num%2==0:
#     print(1)
#     time.sleep(57600-new)
#   else:
#     print(2)
#     time.sleep(28800-new)
import time

# while True:
#     newtime = time.strftime("%H:%M:%S", time.localtime())
#     if newtime in ['08:00:00', '10:00:00', '12:00:00', '14:00:00', '16:00:00', '18:00:00']:
#         os.system("scrapy crawl fk")
#         print('任务执行已完成')
newtime = time.strftime("%H:%M:%S", time.localtime())
os.system("scrapy crawl fk")
print('任务执行已完成')
